package pattern.command;

import java.util.ArrayList;

public class Invoker
{
	ArrayList<Command> commands = new ArrayList<Command>();
	Command command;
	public void setCommand(Command command)
	{
		this.command = command;
	};
	public void trigger()
	{
		commands.add(command);
		System.out.println(commands.size());
		command.execute();
	}
}
